<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;

class WarnOperatorLog extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('warn_operator_log', function (Blueprint $table) {
             $table->engine = 'InnoDB';
             $table->charset = 'utf8';
             $table->collation = 'utf8_general_ci';
            // CONTENT
            $table->unsignedInteger('warn_id')->nullable(false)->comment('告警编号');
			$table->boolean('is_read_status')->nullable(false)->default(0)->comment('告警阅读状态 0=未读, 1=已读');
			$table->string('confirm_user', 50)->nullable(false)->default(0)->comment('操作者');
			$table->unsignedInteger('confirm_userid')->nullable(false)->default(0)->comment('操作者编号');
			$table->datetime('confirm_at')->nullable()->default(null)->comment('操作时间');
			$table->string('appid', 50)->nullable()->default(null)->comment('手机唯一值');
			$table->primary('warn_id');
			
        });

        // DB::statement("alter table `warn_operator_log` comment '告警操作日志'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('warn_operator_log');
    }
}
